home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_01_bab_cinematic_2.cog < prev    next >
Text File  |  1999-11-15  |  16KB  |  501 lines

  1. # Jones 3D Cog Script
  2. #
  3. # 01_BAB_Cinematic_2.cog
  4. #
  5. # Introduce Volodnikov as Indy overhears his Babylon plans 
  6. #
  7. # [HB]
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ===================================================================
  12.  
  13. symbols
  14.  
  15.     # ************************ MESSAGES ************************
  16.  
  17.     message        startup
  18.     message        entered
  19.     message        callback
  20.     message        pulse
  21.     message     activate
  22.     
  23.     # ************************ KEYFRAMES ***********************
  24.     
  25.     keyframe    in_kneel=in_stand_bd_crawl.key            local
  26.     keyframe    in_standUp=0in_crawl_bd_stand.key        local
  27.        
  28.     keyframe    vo_foldArms=0vo_stand3_bd_1.key            local
  29.     keyframe    vo_armsBack=vo_stand2_arms_back.key        local
  30.     keyframe    vo_armsSide=vo_stand3_arms_side.key        local
  31.     keyframe    vo_rubHead=0vo_rubhead_1_2.key            local
  32.     keyframe    vo_thumpHands=0vo_truestory_3_2.key        local
  33.     keyframe    vo_glassesR=0vo_glassesR_3_3.key        local
  34.     keyframe    vo_stop=0vo_handhalt_3_3.key            local
  35.     
  36.     keyframe    vo_waveBoth=0vo_waveboth_walk.key        local
  37.     keyframe    vo_leftup=0vo_leftup_2_1.key            local
  38.     keyframe    vo_leftUp3=0vo_leftup_3_3.key            local
  39.     keyframe    vo_rightup=0vo_rightup_3_3.key            local
  40.     keyframe    vo_bothup=0vo_bothup_3_3.key            local
  41.     keyframe    vo_machine=0vo_machine_3_3.key            local
  42.  
  43.     keyframe    rm_twiddle=0rm_switches_1_1.key            local
  44.     keyframe    rm_point=0rm_points_1_1.key                local
  45.     keyframe    rm_doubt=0rm_methods_1_1.key            local
  46.  
  47.     # ************************* MODELS *************************
  48.         
  49.     model          mod_in=gen_in_shirt.3do                    local
  50.     model          mod_vo=gen_vo.3do                        local 
  51.     model        mod_radMan=bab_rm.3do                    local
  52.     model        mod_chair=bab_chair_dirctr.3do            local
  53.  
  54.     # ************************* SOUNDS *************************
  55.     
  56.     sound        rm_reminds=Bb02m02.wav                    local
  57.     sound        vo_apparat=Bb02v03.wav                    local
  58.     sound        rm_decode=Bb02m04.wav                    local
  59.     sound        vo_lookMarduk=Bb02v05.wav                local
  60.     sound        rm_whatPlane=Bb02m06.wav                local
  61.     sound        vo_aetherium=Bb02v07.wav                local
  62.     sound        rm_doubts=Bb02m08.wav                    local
  63.     sound        vo_informMin=Bb02v09a.wav                local
  64.     sound        vo_trueStory=Bb02v09b.wav                local
  65.     sound       open_doorsound=sea_doors_open_c.wav     local
  66.     sound       close_doorsound=sea_doors_close_c.wav   local
  67.     
  68.     sound       volmusic=mus_gen_russremin3.wav         local
  69.     sound       voclue=BB02J01.WAV                      local
  70.     
  71.     # ************************* THINGS *************************
  72.  
  73.     thing        player                                    local
  74.                             
  75.     thing        indy                                    linkid=0
  76.     thing        volod                                    linkid=1
  77.     thing        radman                                    linkid=2
  78.                                                 
  79.     thing        in_tgt1                                  nolink
  80.     thing        in_tgt2                                  nolink
  81.     thing        in_tgt3                                    nolink
  82.  
  83.     thing        vo_mov_tgt1                                nolink
  84.     thing        vo_mov_tgt2                                nolink
  85.     thing        vo_mov_tgt3                                nolink
  86.     thing        vo_mov_tgt4                                nolink
  87.     thing        vo_mov_tgt5                                nolink
  88.  
  89.     thing        cam_roof1                                nolink
  90.     thing        cam_roof2                                nolink
  91.     thing        cam_inside1                                nolink
  92.     thing        cam_inside2                                nolink
  93.     
  94.     thing        cam_look_tgt1                              nolink
  95.     thing        cam_look_tgt2                              nolink
  96.     thing        cam_look_tgt3                              nolink
  97.     
  98.     thing        cam_mov_tgt1                              nolink
  99.  
  100.     thing        chair                                    nolink
  101.     thing        camera_1                                nolink
  102.     thing       fence_door
  103.     thing       vo_door
  104.     
  105.     thing       vodoor0                                 linkid=5
  106.     thing       vodoor1                                 linkid=5
  107.                            
  108.     # *********************** VARIABLES ***********************
  109.             
  110.     surface        trigger                                 linkid=3
  111.     surface        trigger1                                 linkid=3
  112.     surface        trigger2                                 linkid=3
  113.     
  114.     surface     chatsurf0                               local
  115.     surface     chatsurf1                               local
  116.     surface     chatsurf2                               local
  117.     surface     chatsurf3                               local
  118.                         
  119.     vector        v_camspot                                local
  120.  
  121.     int            in_keyTrack1                            local
  122.     int            in_keyTrack2                            local
  123.  
  124.     int            vo_keyTrack1                            local
  125.     int            vo_keyTrack2                            local
  126.                                             
  127.     int            curSound                                local
  128.     int            didThisBefore=0                            local
  129.  
  130.     int            curCam                                    local
  131.     int         doorcommentchan                         local
  132.     int         safety=0                                local
  133.  
  134.     flex        vo_Turn                                    local
  135.     flex        moveHeadInterval=0.1                    local
  136.     
  137. end
  138.  
  139. # ===================================================================
  140.  
  141. code
  142.  
  143. # -------------------------------------------------------------------
  144. startup:
  145.  
  146.     # Pointer to Player
  147.     player = GetLocalPlayerThing();
  148.     # Prep Radio Man...
  149.     ClearThingFlags(radman, 0x80000);
  150.     AISetCutSceneMode(radman);
  151.     
  152.     return;
  153.  
  154. # -------------------------------------------------------------------
  155. activate:
  156.  
  157.     if ((GetSenderID() == 5) && (safety == 0))
  158.     {
  159.         safety=1;
  160.         StartCutscene(1);
  161.         SetActorFlags(player, 0x200000);
  162.         doorcommentchan=PlayVoice(player, voclue, 1, 0);
  163.         WaitForSound(doorcommentchan);
  164.         sleep(0.5);
  165.         ClearActorFlags(player, 0x200000);
  166.         EndCutscene();
  167.         safety=0;
  168.     }
  169.     
  170. return;
  171.  
  172. # -------------------------------------------------------------------
  173. entered:
  174.  
  175.     if ((GetSenderID() == 3) && (didThisBefore == 0))
  176.     {
  177.     
  178.         didThisBefore = 1;       
  179.         curCam = GetCurrentCamera();
  180.         
  181.         SetActorFlags(player, 0x200000);
  182.         StartCutscene(1);
  183.         
  184.         # Mood music!
  185.         PlaySoundLocal(volmusic, 1, 0, 0, 0);
  186.         
  187.         # Disable player...
  188.         SetThingFlags(player, 0x80000);
  189.         
  190.         # Prep actor Indy...
  191.         CopyPlayerHolsters(player, indy);
  192.         CopyOrientandPos(player, indy);
  193.         ClearThingFlags(indy, 0x80000);
  194.         RotatePivot(vo_door, 1, 1);
  195.         SetCollideType(fence_door, 0);
  196.         MoveToFrame(fence_door, 1, 1);
  197.         PlaySoundThing(open_doorsound, vo_door, 1, 3, 10, 0);
  198.         
  199.         # Prep Volodnikov...
  200.         ClearThingFlags(volod, 0x80000);
  201.         TeleportThing(volod, vo_mov_tgt1);
  202.         AISetMoveSpeed(volod, 1.2);
  203.         vo_Turn = GetThingMaxRotVel(volod);
  204.         SetThingMaxRotVel(volod, 135.0);
  205.         
  206.         # Prep Radio Man...
  207.         ClearThingFlags(radman, 0x80000);
  208.         AISetCutSceneMode(radman);
  209.  
  210.         # Prep camera...
  211.         SetCameraLookInterp(2, 0);
  212.         SetCameraPosInterp(2, 0);
  213.          
  214.         # Cut to shot of Indy on roof...
  215.         SetCameraFocus(2, cam_roof1);
  216.         SetCameraSecondaryFocus(2, indy);
  217.         SetCurrentCamera(2);
  218.         SetCameraFOV(80, 0, 0.0);  
  219.         Sleep(0.1);
  220.         
  221.         # Indy crosses the roof...
  222.         AISetMoveSpeed(indy, 1.0);
  223.         AISetLookThingEyeLevel(indy, in_tgt1);
  224.         AISetMoveThing(indy, in_tgt1, 0);
  225.         
  226.         SetCameraFOV(55, 1, 3.1);
  227.         Sleep(1.0);
  228.         
  229.         AISetLookThingEyeLevel(indy, in_tgt2); # re-target Indy early to smooth his path 
  230.         AISetMoveThing(indy, in_tgt2, 0);
  231.         
  232.         # Radioman: "Ministairstvah hereby reminds..."                                          
  233.         PlayVoice(radman, rm_reminds, 1, 0);
  234.  
  235.         Sleep(2.0);
  236.         
  237.         AISetLookThing(indy, vo_mov_tgt3); # why doesn't Indy look down?
  238.         Sleep(0.8);
  239.         in_keyTrack1 = PlayKey(indy, in_kneel, 4, 0x14, 0);
  240.         Sleep(1.0);
  241.         
  242.         # Cut to shot over Indy's shoulder...
  243.         SetCameraFocus(2, cam_roof2);
  244.         SetCameraSecondaryFocus(2, cam_look_tgt1);
  245.         SetCameraFOV(90, 0, 0.0);
  246.         Sleep(0.1);
  247.         
  248.         # dolly camera forward & peer down into Soviet Bab HQ...
  249.         SetCameraInterpSpeed(2, 9.0); # speed is actually time (was 8.8)
  250.         SetCameraPosInterp(2, 1); # turn on dolly mode
  251.         SetCameraFocus(2, cam_mov_tgt1); # start moving
  252.         MoveToFrame(cam_look_tgt1, 1, 0.35); # move target as well (was 0.36)
  253.         SetCameraFOV(60, 1, 9.0); # tighten frame (was 65, 8.8)
  254.         
  255.         # Volodnikov pace 1...
  256.         Sleep(1.2);
  257.         AISetLookThing(volod, vo_mov_tgt2);
  258.         AISetMoveThing(volod, vo_mov_tgt2, 0);
  259.         Sleep(1.9); 
  260.         
  261.         # V pace 2...
  262.         AISetLookThing(volod, vo_mov_tgt1);
  263.         Sleep(0.8); # wait for him to turn
  264.         AISetMoveThing(volod, vo_mov_tgt1, 0);
  265.         
  266.         # Volodnikov: "Those doctrinaire apparatchiki..."
  267.         curSound = PlayVoice(volod, vo_apparat, 1.0, 0.0);
  268.         vo_keyTrack1 = PlayKey(volod, vo_waveBoth, 1, 0x02, 0);
  269.         Sleep(1.3);
  270.         StopKey(volod, vo_keyTrack1, 0.5); # prevent hands behind back
  271.         Sleep(0.5);
  272.         
  273.         # V pace 3 to middle...
  274.         AISetLookThing(volod, vo_mov_tgt3);
  275.         Sleep(0.4); # wait for him to turn
  276.         AISetMoveThing(volod, vo_mov_tgt3, 1);
  277.         Sleep(0.2);
  278.         
  279.         # V halts facing radioman...
  280.         AISetLookThing(volod, radman);
  281.         vo_keyTrack1 = PlayKey(volod, vo_bothup, 4, 0x02, 0);
  282.         Sleep(1.0);
  283.         StopKey(volod, vo_keyTrack1, 0.5); # smooth transition to fold
  284.         vo_keyTrack1 = PlayKey(volod, vo_foldArms, 4, 0x04, 0);
  285.         WaitForSound(curSound);
  286.         
  287.         # Radioman: "Possibly... I'm just decoding the message..."
  288.         PlayKey(radman, rm_twiddle, 4, 0x12, 0);
  289.         Sleep(0.1);
  290.         curSound = PlayVoice(radman, rm_decode, 1.0, 0.0);
  291.         Sleep(1.5);
  292.         PlayKey(radman, rm_point, 4, 0x12, 0);
  293.         WaitForSound(curSound);
  294.         
  295.         # Set Radioman to watch V pace...
  296.         AIEnableHeadTracking(radman, volod);
  297.         
  298.         # Cut to closer shot inside...
  299.         SetCameraPosInterp(2, 0); # kill dolly mode
  300.         SetCameraFocus(2, cam_inside1);
  301.         SetCameraSecondaryFocus(2, cam_look_tgt2);
  302.         SetCameraFOV(65, 0, 0.0);
  303.         Sleep(0.1);
  304.         
  305.         # Volodnikov: "I'm searching for Marduk..."
  306.         PlayVoice(volod, vo_lookMarduk, 1.0, 0.0);
  307.         Sleep(0.6);
  308.         StopKey(volod, vo_keyTrack1, 0.7);
  309.         Sleep(0.7);
  310.         vo_keyTrack1 = PlayKey(volod, vo_armsBack, 2, 0x04, 0);
  311.         Sleep(1.0);
  312.         StopKey(volod, vo_keyTrack1, 0.0);
  313.         vo_keyTrack1 = PlayKey(volod, vo_leftup, 4, 0x14, 0);
  314.         Sleep(1.5);
  315.         StopKey(volod, vo_keyTrack1, 0.5);
  316.         Sleep(0.5);
  317.         
  318.         # V resumes pace 3...
  319.         AISetLookThing(volod, vo_mov_tgt2);
  320.         vo_keyTrack1 = PlayKey(volod, vo_rightup, 2, 0x12, 0);
  321.         Sleep(0.6); # wait for him to turn
  322.         StopKey(volod, vo_keyTrack1, 0.5);
  323.         AISetMoveThing(volod, vo_mov_tgt2, 0);
  324.         Sleep(0.8);
  325.         
  326.         # V pace 4...
  327.         AISetLookThing(volod, vo_mov_tgt1);
  328.         Sleep(1.0); # wait for him to turn
  329.         AISetMoveThing(volod, vo_mov_tgt1, 0);        
  330.         Sleep(1.8);
  331.         
  332.         # V pace 5...
  333.         AISetLookThing(volod, vo_mov_tgt2);
  334.         Sleep(0.5); # start turn
  335.         
  336.         # Radioman: "What kind of plane..."
  337.         PlayVoice(radman, rm_whatPlane, 1.0, 0.0);
  338.         PlayKey(radman, rm_point, 4, 0x12, 0);
  339.         Sleep(0.5); # finish turn
  340.         AISetMoveThing(volod, vo_mov_tgt2, 0);
  341.         Sleep(1.8);
  342.         
  343.         # V faces radioman...
  344.         AISetLookThing(volod, radman);
  345.         Sleep(0.8); # wait for him to turn
  346.         
  347.           # Volodnikov: "Not airplane, you idiot..."
  348.         curSound = PlayVoice(volod, vo_aetherium, 1.0, 0.0);
  349.         vo_keyTrack1 = PlayKey(volod, vo_glassesR, 2, 0x02, 0);
  350.         Sleep(1.2);
  351.         StopKey(volod, vo_keyTrack1, 0.5);
  352.         
  353.         # V pace to corner...
  354.         AISetLookThing(volod, vo_mov_tgt5);
  355.         Sleep(0.6); # wait for him to turn
  356.         AISetMoveThing(volod, vo_mov_tgt5, 0);
  357.         Sleep(1.8);
  358.         
  359.         # V turns back toward radioman...
  360.         AISetLookThing(volod, radman);
  361.         Sleep(0.2);
  362.         PlayKey(volod, vo_bothup, 4, 0x12, 0);
  363.         Sleep(1.3); # wait for him to turn
  364.         WaitForSound(curSound);
  365.         
  366.         # V's pacing has ended, so stop Radioman's head swivel...
  367.         AIDisableHeadTracking(radman);
  368.         
  369.         # Radioman: "Be careful, professor..."
  370.         curSound = PlayVoice(radman, rm_doubts, 1.0, 0.0);
  371.         PlayKey(radman, rm_doubt, 4, 0x12, 0);
  372.         Sleep(0.5);
  373.         vo_keyTrack1 = PlayKey(volod, vo_foldArms, 2, 0x04, 0); # hold pose
  374.         Sleep(3.0); # was 4.0
  375.         
  376.         # V reacts...
  377.         StopKey(volod, vo_keyTrack1, 0.0); # rub takes pose from here
  378.         vo_keyTrack1 = PlayKey(volod, vo_armsBack, 2, 0x10, 0); # prep arms back pose
  379.         PlayKey(volod, vo_rubhead, 4, 0x12, 1); # play rub ending in arms back
  380.         vo_keyTrack2 = PlayKey(volod, vo_armsSide, 2, 0x10, 0); # prep arms at side
  381.         StopKey(volod, vo_keyTrack1, 0.5); # fade arms from back to side 
  382.         Sleep(0.5);
  383.         WaitForSound(curSound); # just in case
  384.         
  385.         # Volodnikov: "Inform Ministairstvah..."
  386.         PlayKey(volod, vo_stop, 4, 0x12, 0);
  387.         Sleep(0.3); # get gesture underway before talk
  388.         curSound = PlayVoice(volod, vo_informMin, 1.0, 0.0);
  389.         Sleep(1.8);
  390.         PlayKey(volod, vo_leftUp3, 4, 0x02, 1);
  391.         StopKey(volod, vo_keyTrack2, 0.5);
  392.         Sleep(0.7);
  393.         
  394.         # V heads back toward radioman...
  395.         AISetMoveSpeed(volod, 1.0);
  396.         AISetMoveThing(volod, vo_mov_tgt3, 1);
  397.         
  398.         # Cut to close-up of V...
  399.         WaitForSound(curSound);
  400.         SetCameraFocus(2, cam_inside2);
  401.         SetCameraSecondaryFocus(2, cam_look_tgt3);
  402.         SetCameraFOV(50, 0, 0.0);
  403.         
  404.         # Volodnikov: "We know the true story..."
  405.         PlayKey(volod, vo_rightup, 4, 0x12, 0);
  406.         Sleep(0.3);
  407.         PlayVoice(volod, vo_trueStory, 1.0, 0.0);
  408.         Sleep(0.8);
  409.         PlayKey(volod, vo_thumpHands, 4, 0x12, 1);
  410.         PlayKey(volod, vo_machine, 4, 0x12, 1);
  411.         Sleep(0.8);
  412.         PlayKey(volod, vo_leftUp3, 4, 0x12, 1);
  413.         
  414.         # Prep the roof early...
  415.         AISetLookThing(indy, vo_mov_tgt5);
  416.         
  417.         # Exit V...
  418.         AISetLookThing(volod, vo_mov_tgt4);
  419.         vo_keyTrack1 = PlayKey(volod, vo_rightup, 2, 0x12, 0);
  420.         Sleep(0.9); # wait for turn
  421.         StopKey(volod, vo_keyTrack1, 0.3);
  422.         Sleep(0.2);
  423.         SetCollideType(vo_door, 0);
  424.         SetCollideType(volod, 0);
  425.         AISetMoveSpeed(volod, 1.0);
  426.         AISetMoveThing(volod, vo_mov_tgt4, 0);
  427.         MoveToFrame(cam_look_tgt3, 1, 1.0); # pan to doorway
  428.         SetCameraFOV(65, 1, 3.0); # widen frame
  429.         Sleep(1.0);
  430.         MoveToFrame(cam_inside2, 1, 0.3); # boom up a bit
  431.         Sleep(2.25); # adjust to be sure V is gone
  432.         
  433.         # TO DO: insert door close here...
  434.         RotatePivot(vo_door, 1, -1);
  435.         PlaySoundThing(close_doorsound, vo_door, 1, 3, 10, 0);     
  436.         AIWaitForStop(volod);
  437.         Sleep(0.5); # take a beat
  438.         SetCollideType(fence_door, 0);
  439.         
  440.         # Cut back to Indy on roof top...
  441.         SetCameraLookInterp(2, 0); # kill pan & tilt mode
  442.         SetCameraPosInterp(2, 0); # kill dolly mode
  443.         SetCameraFocus(2, cam_roof1);
  444.         SetCameraSecondaryFocus(2, indy);
  445.         SetCurrentCamera(2);
  446.         SetCameraFOV(45, 0, 0.0);
  447.         Sleep(0.1);
  448.         PlayKey(indy, in_standUp, 6, 0x12, 1); # stand him up
  449.         StopKey(indy, in_keyTrack1, 0.0); # kill kneeling pose
  450.         AISetLookThing(indy, in_tgt3);
  451.         Sleep(0.4); # was 0.5
  452.         
  453.         # Clean up...
  454.         SetCameraLookInterp(2, 0);
  455.         SetCameraPosInterp(2, 0);
  456.         SetThingFlags(volod, 0x80000);
  457.         SetThingFlags(indy, 0x80000);
  458.         AIClearCutSceneMode(radman);
  459.         
  460.         SetThingMaxRotVel(volod, vo_Turn);
  461.         CopyOrientAndPos(indy, player);
  462.         ResetThing(player);
  463.         # need to reset Indy's action so he just stands here...
  464.         Sleep(0.01);
  465.         ClearThingFlags(player, 0x80000);
  466.         
  467.         v_camspot = VectorAdd(VectorTransformToOrient(player, '0.25 -0.1 0.0'), GetThingPos(player));    
  468.         SetCameraPosition(1, v_camspot);
  469.         SetCurrentCamera(curCam);
  470.         ResetCameraFOV(0, 0.0);     
  471.         Sleep(1.0);                                                    
  472.         SetCollideType(fence_door, 3);
  473.         DestroyThing(radman); # gone!
  474.  
  475.         EndCutscene();
  476.         ClearActorFlags(player, 0x200000);
  477.         MoveToFrame(fence_door, 0, 1);
  478.         SetCollideType(vo_door, 3);
  479.         safety=1;
  480.     }        
  481.      
  482.     return;
  483.  
  484. # -------------------------------------------------------------------
  485.  
  486. pulse:
  487.  
  488.     SetThingHeadLookThing(radman, volod);
  489.  
  490. return;
  491.     
  492. # -------------------------------------------------------------------
  493.  
  494. callback:
  495.  
  496. return;
  497.  
  498. # -------------------------------------------------------------------
  499.  
  500. end
  501.